package org.jeecg.modules.meter.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.entity.meter.*;
import org.jeecg.model.meter.reqvo.MeterDayReportReqVo;
import org.jeecg.model.meter.resvo.MeterUseListRespVo;
import org.jeecg.model.meter.resvo.MeterUseReportRespVo;
import org.jeecg.modules.message.entity.SysMessage;
import org.jeecg.vo.meter.FloorResVo;
import org.jeecg.vo.meter.MeterSmsRespVo;
import org.jeecg.vo.meter.roomResVo;

import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.List;


/**
 * @Description: 水电表基础信息
 * @Author: jeecg-boot
 * @Date:   2020-11-20
 * @Version: V1.0
 */
public interface IMeterService extends IService<Meter> {
    Result add(@Valid Meter meter);

    List<Meter> findPage(Page<Meter> page,Meter meter);

    List<MeterUseListRespVo> queryUseList();

    Integer updateStatus(String meterId, Integer state, LoginUser loginUser);

    List<ReceiveList> getAddressList(String meterId);

    List<MeterRead> historyRead(String meterId);

    void updateSwitchStatus(Meter meter);

    List<Meter> queryMeterList(List<String> asList);

    boolean deleteByMeterId(String id);

    boolean editMeter(Meter meter);

    Integer changeMeter(Meter meter);

    String queryProjectName(String projectId);

    String queryFloorName(String projectId, String trim);

    String queryRoomName(String floorId, String trim);

    void saveBatchExcel(List<Meter> meterList);

    Meter getSelfById(String meterId);

    List<Meter> findByIds(List<String> ids);

    int updateSyncStatus(String id, String meterKey);

    List<MeterUseReportRespVo> findGroupList(MeterDayReportReqVo meterDayReportReqVo);

    List<Meter>  findMeterList();

    String queryTenantId(String projectId);

    List<MeterSmsRespVo> queryMeterSms();

    SysMessage querySmsIsSend(String id);


    List<roomResVo> queryRoomList(String projectId);

    List<FloorResVo> queryFloorList(String projectId);

    boolean collectorAddressBatch(List<String> meterIds,String collector);

    List<String> getCollectorAddress(List<String> meterIds);

    List<String> queryFeeItemNameByMeterId(String id);


    Integer queryCountMeterCode(String meterCode);

    Result repairRead(MeterRead oldMeterRead, MeterChargeInfo meterChargeInfo, BigDecimal preRead);

    Integer queryMeterUseCount();

    void saveMeterMonthUse(List<MeterUseListRespVo> meterUseListRespVos);

    List<MeterUseListRespVo> getMeterMonthUse();


    void updateMonthMeterUse(List<MeterUseListRespVo> meterUseListRespVos);

    List<MeterChargeInfo> getMeterPayRecord(String meterId);
}
